/**
 * 
 */
package com.curso.sesion7.polimorfismo;

/**
 * @author MATEUS
 *
 */
public class TestPolimorfismo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Figura esfera0 = new Esfera();
		esfera0.dibujar();
		
		Figura3D esfera1 = new Esfera();
		esfera1.dibujar();
		
		Figura3D esfera = new Esfera();
		esfera.calcularVolumen();
		
		Esfera e = new Esfera();
		e.over1();
		
		Esfera e2 = new EsferaAzul();
		e2.over1();
		
		ClaseA ca = new ClaseA();
		ClaseA cb = new ClaseB();
		ClaseA cc = new ClaseC();
		ClaseA cd = new ClaseD();
		ClaseA ce = new ClaseE();
		ClaseX cx = new ClaseX();
		
		ClaseA[] array = new ClaseA[]{ca, cb, cc, cd, ce};
		
		for (int i = 0; i < array.length; i++) {
			array[i].call();
			array[i].call2();
		}

		System.out.println("----------------");
		m1(new ClaseA());
		m1(new ClaseB());
		m1(new ClaseC());
		m1(new ClaseD());
		m1(new ClaseE());
		
		InterfaceA ia = new ClaseA();
		ia = new ClaseE();
		
		
	}
	
	public static void m1(ClaseA c) {
		c.call2();
	}

}
